﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="WebSite.cn.register" %>

<%@ Register Src="head.ascx" TagName="head" TagPrefix="uc1" %>
<%@ Register Src="category.ascx" TagName="category" TagPrefix="uc2" %>
<%@ Register Src="bottom.ascx" TagName="bottom" TagPrefix="uc3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title><%=WebSite.info.info1("", "shoptitle")%></title>
    <meta name="Description" content="<%=WebSite.info.info1("","shopcontent")%>" /> 
    <meta name="Keywords" content="<%=WebSite.info.info1("","shopkey")%>" />
    <link href="style.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" type="text/javascript" src="../js/function.js"></script>
    <script  type="text/javascript" language="javascript">
        function checkForm() {


            var str = document.getElementById("pas").value;
            if (str.length == 0) return true;
            //在JavaScript中，正则表达式只能使用"/"开头和结束，不能使用双引号
            var Expression=/^[A-Za-z]{1}([A-Za-z0-9]|[._]){5,19}$/; 
            var objExp=new RegExp(Expression);
            if(objExp.test(str)==true){
               return true;
           } else {
           alert("密码由6-20位的字母、数字、下划线和点“.”组成");
               return false;
            }

        }

    </script>
   
</head>
<body>
    <center>
	<uc1:head ID="head_1" runat="server" />
<div id="container">
   
   
	  <div class="title">
	     
			<p>用户注册</p>
               <div style="width:100%"  align="left" >  <img src="images/span_solid.png" width="980px" alt="" /></div>
	  </div>
       
	  <div class="pro02"><br />
	    <br />
	    <div><br />
          <form id="frm" runat="server">
		  <table width="95%" border="0" cellspacing="0" cellpadding="5">  
            <tr>
              <td width="35%" align="right"><strong>登录用户名&nbsp;</strong></td>
              <td width="65%" align="left"><input name="usernamea" id="usernamea" runat="server" type="text"  />*<asp:RequiredFieldValidator 
                      ID="RequiredFieldValidator1" runat="server" style="color:Red"
                      ErrorMessage="登录用户名不能为空" ControlToValidate="usernamea"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
              <td width="35%" align="right">&nbsp;</td>
              <td width="65%" align="left">
                  <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"  style="color:Red"
                      ControlToValidate="usernamea" ErrorMessage="登录用户名由6-20个字母、数字和下划线组成" 
                      ValidationExpression="^(\w){6,20}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
              <td align="right"><strong>密码&nbsp;</strong></td>
              <td align="left"><input name="pas" id="pas"  type="password"  runat="server" />*<asp:RequiredFieldValidator 
                      ID="RequiredFieldValidator2" runat="server"  style="color:Red"
                      ErrorMessage="密码不能为空" ControlToValidate="pas"></asp:RequiredFieldValidator>
                &nbsp;
                </td>
            </tr>
            <tr>
              <td align="right">&nbsp;</td>
              <td align="left">
                  <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"  style="color:Red"
                      ControlToValidate="pas" ErrorMessage="密码由6-20位的字母、数字、下划线和点“.”组成" 
                      ValidationExpression="^([A-Za-z0-9]|[._]){5,19}"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
              <td height="35" align="right"><strong>确认密码&nbsp;</strong></td>
              <td height="35" align="left"><input name="pas1" id="pas1" runat="server" type="password" />*
              <asp:RequiredFieldValidator 
                      ID="RequiredFieldValidator6" runat="server"  style="color:Red"
                      ErrorMessage="确认密码不能为空" ControlToValidate="pas1"></asp:RequiredFieldValidator>
              <asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="两次密码不一致"  style="color:Red"
                      ControlToCompare="pas" ControlToValidate="pas1"></asp:CompareValidator>
                </td>
            </tr>
            <tr>
              <td align="right"><strong>E-Mail地址&nbsp;</strong></td>
              <td align="left"><input name="email" id="email" runat="server" type="text" /></td>
            </tr>
            <tr>
              <td align="right">&nbsp;</td>
              <td align="left">
                  <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                      ControlToValidate="email" ErrorMessage="E-Mail格式不正确"  style="color:Red"
                      ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </td>
            </tr>
              <tr>
                  <td align="right" height="35"><strong>收件人姓名&nbsp;</strong></td>
                  <td align="left" height="35"><input name="cname" runat="server" id="cname" type="text" />*<asp:RequiredFieldValidator 
                      ID="RequiredFieldValidator4" runat="server"  style="color:Red"
                      ErrorMessage="收件人姓名不能为空" ControlToValidate="cname"></asp:RequiredFieldValidator>
                  </td>
              </tr>
              <tr style="display:none">
                  <td align="right" height="35"><strong>性别&nbsp;</strong></td>
                  <td align="left" height="35">
                    <asp:RadioButtonList ID="rbtSex" runat="server" RepeatDirection="Horizontal">
                  <asp:ListItem Text="男" Value="0"></asp:ListItem>
                  <asp:ListItem Text="女" Value="1"></asp:ListItem>
                  </asp:RadioButtonList>
                  </td>
              </tr>
            <tr>
              <td height="35" align="right"><strong>联系电话&nbsp;</strong></td>
              <td height="35" align="left"><input name="tel" id="tel" runat="server" type="text" /></td>
            </tr>
            <tr>
              <td height="35" colspan="2" align="center"><asp:Button ID="Button1" runat="server" CssClass="button" Text="确定注册"  OnClick="Button1_Click" /></td>
            </tr>
         
          </table>
            </form>
		</div>
	  </div>
	  
   </div>
   <uc3:bottom ID="bottom_1" runat="server" />
</center>
</body>
</html>
